package com.basker.pisces.logger;

import java.io.IOException;

import org.springframework.core.io.Resource;

import com.basker.pisces.core.resource.IResourceLoader;
import com.basker.pisces.core.resource.annotation.ResouceLoader;

@ResouceLoader(priority = Integer.MAX_VALUE, locationPatterns = {"classpath*:**/*logback*.xml"})
public class LogBackXmlConfigResourceLoader implements IResourceLoader {

    @Override
    public void load(Resource[] resources) throws IOException {
        for (Resource resource : resources) {
            LogBackXmlConfigLoader.load(resource.getURL());
        }
    }

}
